import { ApiProperty } from '@nestjs/swagger';
import { IsNotEmpty, IsOptional } from 'class-validator';

export class CreateRolePermissionDto {
	@ApiProperty({
		required: true,
		description: '角色id',
	})
	@IsNotEmpty()
	roleId: number;

	@ApiProperty({
		required: false,
		description: '菜单的ids',
	})
	@IsOptional()
	menuIds: number[];

	@ApiProperty({
		required: false,
		description: '权限id列表',
	})
	@IsOptional()
	permissionIds: number[];
}
